#pragma once

#include <base_controller.h>
#include <loguru/loguru.hpp>
#include <httplib.h>

// note: controller

namespace Controller
{
    class PacketController : public BaseController
    {
    public:
        PacketController(std::shared_ptr<httplib::Server> server, std::shared_ptr<Tshark::TsharkManager> manager);

        /// @brief 注册路由
        virtual void registerRoute();

        /// @brief 从数据库获取packet列表
        /// @param req
        /// @param resp
        void getPacketList(const httplib::Request &req, httplib::Response &resp);

        /// @brief 离线分析数据
        /// @param req 
        /// @param resp 
        void analysisFile(const httplib::Request& req,httplib::Response& resp);
    };
}